package handle;

import common.Client;
import common.ClientOperate;
import common.GetFileUpHandle;

/**
 * 自动发送请求到server.
 *
 * @author guanweichen
 * @version Jan 18, 2011
 */
public class LocalGetFileUpHandle extends GetFileUpHandle {

	Integer port;
	ClientOperate operate;
	public LocalGetFileUpHandle(Integer port, ClientOperate operate) {
		this.port = port;
		this.operate = operate;
	}
	@Override
	public void run() {
		
		while(true){
			try {
				sleep(Integer.parseInt(Client.rb.getString("time_span")));
			} catch (NumberFormatException e) {
				e.printStackTrace();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			operate.getFile(operate.client.getFileName(), true);
		}
	}
}
